package com.iut.utils;

import com.iut.projectandroid.CommandeActivity;
import com.iut.projectandroid.ControleActivity;
import com.iut.projectandroid.ConvertisseurActivity;
import com.iut.projectandroid.R;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

public class MenuHelper 
{
	public static boolean launchActivity(Activity activity, Context context, int itemId)
	{
		switch (itemId)
		{
			case R.id.convertisseur:
				Intent iConvertisseur = new Intent(context, ConvertisseurActivity.class);
				activity.startActivity(iConvertisseur);
			return true;
				
			case R.id.controle:
				Intent iControle = new Intent(context, ControleActivity.class);
				activity.startActivity(iControle);
			return true;
				
			case R.id.commande:
				Intent iCommande = new Intent(context, CommandeActivity.class);
				activity.startActivity(iCommande);
			return true;
	
			default: return false;
		}
	}
}
